package Demo16_30.Test28;

import org.apache.commons.io.FileUtils;

import java.io.File;
import java.io.IOException;
import java.util.List;

/**
 * Created by 14229 on 2020/1/31.
 */
public class Test {
    public static void main(String[] args) throws IOException {

        List<String> list = FileUtils.readLines(new File("data28.txt"), "UTF-8");


        byte [] bytes = new byte[list.size()];

        for (int i =list.size()-1; i >=0 ; i--) {
            String[] split = list.get(i).split("=");
            byte num = (byte) (Integer.parseInt(split[1])+2);
            System.out.println(num);
            bytes[Integer.parseInt(split[0])]=  num;

        }

        FileUtils.writeByteArrayToFile(new File("qwqw.jpg"),bytes);
        System.out.println("写入完毕");
    }
}
